qemu: Fix shift-insert behavior
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 14 May 2008 08:16:40 +0000 (09:16 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 14 May 2008 08:16:40 +0000 (09:16 +0100)
commit9d7437ea1d9e44e624cd3ebbe30f1a766827a19a
treee367981c7937778328d39dc780383e91855e5549
parenteaad775dc26f767c5c281f294ddedd64ac63602f
qemu: Fix shift-insert behavior

This patch is related to Changeset 15635:7bdc9f6407d3
<http://xenbits.xensource.com/staging/xen-unstable.hg?rev/7bdc9f6407d3>
[PVFB] Fix shift key for graphical vnc display.
With above patch, if a user presses shift-insert, qemu sends shift
down, shift up, insert down and then another shift key down (see trace
below).  This makes it impossible to do shift insert pasting or use
guest hot shifted-Fkeys.

Shift Insert trace:
 do_key_event():1135 keycode:2a         shift down
    kbd_put_keycode():539 keycode:2a     send shift down
 do_key_event():1135 keycode:d2         insert down
    kbd_put_keycode():539 keycode:aa     send shift up
    kbd_put_keycode():539 keycode:e0     send insert down
    kbd_put_keycode():539 keycode:52
 do_key_event():1135 keycode:d2         insert up
    kbd_put_keycode():539 keycode:e0     send insert up
    kbd_put_keycode():539 keycode:d2
    kbd_put_keycode():539 keycode:2a     send shift down
 do_key_event():1135 keycode:2a         shift up
    kbd_put_keycode():539 keycode:aa     send shift up

This patch adds a check for the keycode being shiftable, something
other than a keypad key, f1-12 , insert, del , etc. before allowing
the press_shift_up() operation.

Signed-off-by: Pat Campbell <plc@novell.com>
tools/ioemu/keymaps.c
tools/ioemu/vnc.c